/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.restaurant.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 货物采购明细表实体类
 *
 * @author Blade
 * @since 2025-01-21
 */
@Data
@TableName("restaurant_commodity_record_relation")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "货物采购明细表")
public class CommodityRecordRelation extends TenantEntity {

    @Serial
	private static final long serialVersionUID = 1L;

    /**
     * 采购记录ID
     */
    @Schema(description = "采购记录ID")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long commodityRecordId;
    /**
     * 采购类别ID
     */
    @Schema(description = "采购类别ID")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;
    /**
     * 类别名
     */
    @Schema(description = "类别名")
    private String categoryName;
	/**
	 * 分类排序
	 */
	@Schema(description = "分类排序")
	private Integer sort;
    /**
     * 采购商品ID
     */
    @Schema(description = "采购商品ID")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;
    /**
     * 货物名
     */
    @Schema(description = "货物名")
    private String commodityName;
    /**
     * 商品图
     */
    @Schema(description = "商品图")
    private String productPicture;
	/**
	 * 单位
	 */
	@Schema(description = "单位")
	private String unit;
    /**
     * 数量
     */
    @Schema(description = "数量")
    private Integer number;
    /**
     * 实到数量
     */
    @Schema(description = "实到数量")
    private BigDecimal actualNumber;

	/**
	 * 数量差额
	 */
	@Schema(description = "数量差额")
	private BigDecimal difference;

	/**
	 * 金额
	 */
	@Schema(description = "金额")
	private BigDecimal amount;
	/**
	 * 单价
	 */
	@Schema(description = "单价")
	private BigDecimal unitPrice;
	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

}
